<script>
export default {
    data() {
        return {
            count: 0
        }
    }
}
</script>

<template>
    <div class="bgImg">
        <div class="login-box">
            <h1>登陆</h1>
            <div class="input-box">
                <div class="input-text">
                    <span class='iconfont icon-mine'></span>
                    <input type="text" placeholder="用户名">
                </div>
                <div class="input-text">
                    <span class='iconfont icon-lock'></span>
                    <input type="password" placeholder="密码">
                </div>
                <div class="input-btn">
                    登陆
                </div>
                <div class="sign-up">
                    还没账户？<a href="#">立即注册</a>
                </div>
            </div>
        </div>
    </div>
</template>

<style scoped  >
@import './css/iconfont.css';
/* @import './css/index.css'; */

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.bgImg {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    /* background-image: url("../img/1.jpg"); */
    background-image: url("./img/login-bg1.jpg");
    animation: slideShow 40s infinite;
    /* 调用名称为slideShow的动画，并设置无限次数重复播放 */
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    overflow: hidden;
}

/* 定义动画 */
@keyframes slideShow {
    0% {
        background-image: url('img/login-bg1.jpg')
    }

    /* 初始状态时显示第一张图片 */
    25% {
        background-image: url('img/login-bg2.jpg')
    }

    /* 在动画进行到25%时切换到第二张图片 */
    50% {
        background-image: url('img/login-bg3.jpg')
    }

    /* 在动画进行到50%时切换到第三张图片 */
    75% {
        background-image: url('img/login-bg4.jpg')
    }

    /* 在动画进行到50%时切换到第三张图片 */
    100% {
        background-image: url('img/login-bg1.jpg')
    }

    /* 最后返回到第一张图片开始新一轮循环 */
}

.login-box {
    display: flex;
    justify-content: center;
    align-content: space-around;
    flex-wrap: wrap;
    width: 600px;
    height: 400px;
    background-color: rgba(0, 0, 0, .5);
    border: 10px;
    padding: 20px 50px;
    border-radius: 20px;
}

.login-box h1 {
    width: 100%;
    display: flex;
    justify-content: center;
    color: #fff;
    font-size: 30px;
}

.login-box .input-box {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    transform: translateY(-35px);
}

.login-box .input-box .input-text {
    width: 100%;
    display: flex;
    justify-content: center;
}

.login-box .input-box .input-text span {
    color: white;
    font-size: 18px;
    margin-top: 20px;
}

.login-box .input-box .input-text input {
    border: 0;
    padding: 6px;
    border-bottom: 1px solid white;
    background-color: #ffffff00;
    color: #fff;
    margin-top: 20px;
}

.login-box .input-box .input-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 25px;
    width: 145px;
    height: 25px;
    color: #fff;
    background: linear-gradient(120deg, #a6c0fe 0%, #f68084 100%);
    border-radius: 25px;
    cursor: pointer;
}

.login-box .input-box .sign-up {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 40px;
    color: white;
    font-size: 15px;
    pointer-events: none;
}

.login-box .input-box .sign-up a {
    color: #3498db;
    text-decoration: none;
    cursor: pointer;
}
</style>